package top.heliming.leyou.userconsumer.controller;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import top.heliming.leyou.userconsumer.bean.User;
import top.heliming.leyou.userconsumer.service.UserService;

/**
 * description: //TODO
 *
 * @author: heliming
 * @date:2019/05/22 下午 10:53
 */
@RestController
@RequestMapping("consume")
public class ConsumerController {

  @Autowired
  private UserService userService;
  @GetMapping
  public List<User> consume(@RequestParam("ids") List<Long> ids){
    return this.userService.queryUserByIds(ids);
  }
}
